<?php

use Melon\Foundation\Request;

require_once __DIR__ . "/../vendor/autoload.php";

$raw = "GET / HTTP/1.1\r\n
Host: localhost:8000\r\n
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:75.0) Gecko/20100101 Firefox/75.0\r\n
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8\r\n
Accept-Language: zh-CN,zh;q=0.8,zh-TW;q=0.7,zh-HK;q=0.5,en-US;q=0.3,en;q=0.2\r\n
Accept-Encoding: gzip, deflate\r\n
Connection: keep-alive\r\n
Cookie: BAIDUID=9edc3f7eeb3c3eba845e05d42e7e8927:FG=1; BIDUPSID=9edc3f7eeb3c3eba845e05d42e7e8927; PSTM=1585321045; BD_UPN=13314752; BDUSS=pwaHR1YzNiY2VZaTN0Q2RaNnQtRmRmMW9BbEhQRXp1RXFjWVlNRnZMcHROcVplRVFBQUFBJCQAAAAAAAAAAAEAAABF8woGYmFvZ3VveGlhbzA1MzgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAG2pfl5tqX5eTn; MCITY=-%3A; cflag=13%3A3; yjs_js_security_passport=17df674b038e86a9c6647dd0607b65c572711331_1588459770_js; BDORZ=B490B5EBF6F3CD402E515D22BCDA1598; B64_BOT=1; BD_HOME=1; H_PS_PSSID=1461_31326_21121_31426_31342_31270_31463_31229_30823_31164_22159; BDRCVFR[feWj1Vr5u3D]=I67x6TjHwwYf0; delPer=0; BD_CK_SAM=1; PSINO=7; ZD_ENTRY=bing; rsv_jmp_slow=1588425589849; sug=3; sugstore=0; ORIGIN=0; bdime=0\r\n
Upgrade-Insecure-Requests: 1\r\n
Pragma: no-cache\r\n
Cache-Control: no-cache\r\n
\r\n";

$request = new Request();
$request->parse($raw, '127.0.0.1:64360');

//dd($request);